<%@ include file = "/common/ini.jsp"%>
<%@ include file = "/common/_log4j.jsp"%>
<%@ include file = "/common/_ApplicationContext_init.jsp"%>
<%@ include file = "/js/_js_for_select.jsp"%>
<%
    String title = "查询任务运行情况";
%>
<%
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    String nowStr = sdf.format(new Date());
%>
<%@ include file = "/common/detail/_OnForm.jsp"%>
<script>
    function goback()
    {
        window.location.href = "<%= request.getContextPath()%>/moduleinfor/back2LastList.jsp";
    }
    function bodyLoadJS()
    {
        detailForm.taskCode.focus();
    }

    function reset()
    {
        <%
            TaskRunningInfoManager triManager = (TaskRunningInfoManager)applicationContext.getBean("taskRunningInfoManager");    
            List tasks = triManager.findTasks();
            for(int i = 0; i < tasks.size(); i ++)
            {
                Task task = (Task)tasks.get(i);
                %>addOption(detailForm.taskCode,"<%= task.getCode()%>","<%= task.getName()%>");<%
            }//for
        %>
    }

    function submitData()
    {
        detailForm.serviceURL.value = "system.taskrunninginfo.FindTaskRunningInfosService";
        detailForm.submit();
    }
</script>
<form name="detailForm" action="Controller.jsp" method="get">
    <tr >
        <td class="detailTD11">任务名&nbsp;&nbsp;</td>
        <td class="detailTD12">
            <select name="taskCode"  onkeyup="nextOfFocused(this)" afterFocusedJS="" of="true">
                <option value="%">所有
            </select>
        </td>
    </tr>
    <tr >
        <td class="detailTD21">运行结果&nbsp;&nbsp;</td>
        <td class="detailTD22">
            <select name="result"  onkeyup="nextOfFocused(this)" afterFocusedJS="" of="true">
                <option value="%">所有
                <option value="<%= TaskRunningResult.SUCCESSFUL%>"><%= TaskRunningResult.NAMES[TaskRunningResult.SUCCESSFUL]%>
                <option value="<%= TaskRunningResult.FAILED%>"><%= TaskRunningResult.NAMES[TaskRunningResult.FAILED]%>
            </select>
        &nbsp;&nbsp;</td>
    </tr>
    <tr >
        <td class="detailTD11">开始运行时间&nbsp;&nbsp;</td>
        <td class="detailTD12"><input type="text" readonly name="startTime" value="<%= nowStr%>" >&nbsp;<image style="cursor:hand" src="<%= request.getContextPath()%>/images/detail/calendar.gif" onclick="fPopCalendar(detailForm.startTime,detailForm.startTime);"></td>
    </tr>
    <tr >
        <td class="detailTD21">运行结束时间&nbsp;&nbsp;</td>
        <td class="detailTD22"><input type="text" readonly name="endTime" value="<%= nowStr%>" >&nbsp;<image style="cursor:hand" src="<%= request.getContextPath()%>/images/detail/calendar.gif" onclick="fPopCalendar(detailForm.endTime,detailForm.endTime);"></td>
    </tr>
    <input type="hidden" name="serviceURL">
</form>
<%@ include file = "/common/detail/_UnderFom_OnButton.jsp"%>
      <input  type="button" value="查询" of="true" onclick="submitData()" onkeyup="nextOfFocused(this)" afterFocusedJS="" of="true">
      &nbsp;&nbsp;<input  type="button" onclick="window.location.reload();" value="重置">
      &nbsp;&nbsp;<input  type="button" onclick="goback()" value="返回">
<%@ include file = "/common/detail/_UnderFom_underButton.jsp"%>
<%@ include file = "/js/_of_js.jsp"%>
<%@ include file ="/js/_js_for_date.jsp"%>
<%@ include file = "/js/_js_for_date_input.jsp"%>